import { BrowserName } from './func';

export const cloudinaryPostImageCoverPlaceholder =
  'https://media.daily.dev/image/upload/s--P4t4XyoV--/f_auto/v1722860399/public/Placeholder%2001';

export const cloudinaryFeedFiltersYourFeedDark =
  'https://media.daily.dev/image/upload/s--_0r3L1f9--/v1689662930/Your_feed_dark_ord3s0.png';

export const cloudinaryFeedFiltersYourFeedLight =
  'https://media.daily.dev/image/upload/s--n6DmR1cJ--/v1689662930/Your_feed_light_iyrsva.png';

export const cloudinaryFeedFiltersScrollDark =
  'https://media.daily.dev/image/upload/v1671199935/public/scroll_feed_filters.svg';

export const cloudinaryFeedFiltersScrollLight =
  'https://media.daily.dev/image/upload/v1687252879/Categories-WV_dhrdcy.svg';

export const cloudinaryNotificationsBig =
  'https://media.daily.dev/image/upload/public/notification_big.svg';

export const cloudinaryNotificationsBrowser =
  'https://media.daily.dev/image/upload/v1670512489/public/notification_animated.gif';

export const cloudinaryNotificationsBrowserEnabled =
  'https://media.daily.dev/image/upload/v1672124926/public/notifications_enabled.gif';

export const cloudinarySquadsDirectoryCardBannerDefault =
  'https://media.daily.dev/image/upload/s--puRUea_K--/f_auto/v1690887143/cover-generic_blur_xny4yt';

export const cloudinarySquadsImageFallback =
  'https://media.daily.dev/image/upload/s--LrHsyt2T--/f_auto/v1692632054/squad_placeholder_sfwkmj';

export const cloudinaryOrganizationImageFallback =
  'https://media.daily.dev/image/upload/s--yc7EcfBs--/f_auto,q_auto/v1/public/organization_fallback';

export const cloudinarySquadsCreateSquadBiggerThanMobile =
  'https://media.daily.dev/image/upload/s--POqnH7nQ--/f_auto/v1722253758/Create_new_Squad_xe4jvz';

export const cloudinarySquadsCreateSquadMobile =
  'https://media.daily.dev/image/upload/s--m5ymoplf--/f_auto/v1722253758/Create_new_Squad_mobile_ciehql';

export const cloudinarySquadsTourBanner0 =
  'https://media.daily.dev/image/upload/f_auto/public/squad_tour0';

export const cloudinarySquadsTourBanner1V2 =
  'https://media.daily.dev/image/upload/f_auto/public/squad_tour1_v2';

export const cloudinarySquadsTourBanner2 =
  'https://media.daily.dev/image/upload/f_auto/public/squad_tour2';

export const cloudinarySquadsTourBanner3 =
  'https://media.daily.dev/image/upload/f_auto/public/squad_tour3';

export const cloudinarySquadsTourBanner4V2 =
  'https://media.daily.dev/image/upload/f_auto/public/squad_tour4_v2';

export const cloudinarySquadsPromotionSettings =
  'https://media.daily.dev/image/upload/s--t2gh6NPn--/f_auto/v1686119165/Customize_squad_settings_nepkhd';

export const cloudinarySquadsPromotionRemove =
  'https://media.daily.dev/image/upload/s--Eux3awhS--/f_auto/v1686120942/Remove_squad_members_jukf7z';

export const cloudinarySquadsPromotionDelete =
  'https://media.daily.dev/image/upload/s--wXug6Yop--/f_auto/v1686119164/Remove_posts_and_comments_pu3zjj';

export const cloudinarySquadsPromotionBanner =
  'https://media.daily.dev/image/upload/s--6v3E8go1--/f_auto/v1686119164/promoted-bg_k9jzgt';

export const cloudinarySquadsPromotionInvite =
  'https://media.daily.dev/image/upload/s--d3OMbTzl--/f_auto/v1686119165/Grow_your_squad_wtlbof';

export const cloudinarySquadsPromotionPromote =
  'https://media.daily.dev/image/upload/s--iMFoS7Pd--/f_auto/v1686119165/Manage_roles_and_permissions_om64cu';

export const cloudinarySquadsEmptySquad =
  'https://media.daily.dev/image/upload/f_auto/public/empty-squad';

export const cloudinarySquadsEmptySquadLight =
  'https://media.daily.dev/image/upload/f_auto/public/empty_squad_light';

export const cloudinaryReferralCampaignGenericSad =
  'https://media.daily.dev/image/upload/s--rMfJxJbl--/f_auto/v1697024846/ido_sad_xbe6p5';

export const cloudinaryReferralCampaignGenericHappy =
  'https://media.daily.dev/image/upload/s--gnompkBm--/f_auto/v1697024846/ido_happy_zfosbr';

export const cloudinaryReferralCampaignSearchBg =
  'https://media.daily.dev/image/upload/s--lYQL8anp--/f_auto/v1697393720/referral_bg_i261vi';

export const cloudinaryReferralCampaignSearchBgMobile =
  'https://media.daily.dev/image/upload/s--pvdAKlaQ--/f_auto/v1697393719/referral_bg_mobile_on0esi';

export const cloudinaryReferralCampaignSearchBgPopupMobile =
  'https://media.daily.dev/image/upload/s--19oBvNgw--/f_auto/v1697393719/referral_bg_popup_mobile_on7ss5';

export const cloudinaryReferralCampaignGenericReferralBackgroundDark =
  'https://media.daily.dev/image/upload/s--GBy6n7jn--/f_auto/v1685961531/public/background_Image';

export const cloudinaryReferralCampaignGenericReferralAppScreenshot =
  'https://media.daily.dev/image/upload/s--m_DzIlz0--/f_auto/v1698844735/platform_bjdgxm';

export const cloudinaryReferralCampaignGenericReferralPlayButton =
  'https://media.daily.dev/image/upload/v1698844736/play_button_h38ezx.svg';

export const cloudinaryReferralCampaignGenericReferralPurpleEdgeGlowTablet =
  'https://media.daily.dev/image/upload/v1698922944/glow_mobile_tablet_lsou4j.svg';

export const cloudinaryOnboardingGlow =
  'https://media.daily.dev/image/upload/v1694596741/Glow_o9ehvn.svg';

export const cloudinaryOnboardingFullBackgroundMobile =
  'https://media.daily.dev/image/upload/s--EwsBTBt6--/f_auto/v1716969841/dailydev_where_developers_suffer_together_mobile_shkn1w';

export const cloudinaryOnboardingFullBackgroundDesktop =
  'https://media.daily.dev/image/upload/s--r2ffZPB4--/f_auto/v1716969841/dailydev_where_developers_suffer_together_sfvfog';

export const cloudinaryGenericNotFoundLight =
  'https://media.daily.dev/image/upload/s--t81_4qLS--/f_auto/v1708330060/404-lightmode_eweviu';

export const cloudinaryGenericNotFoundDark =
  'https://media.daily.dev/image/upload/s--Rxdm7vdJ--/f_auto/v1708328512/404_z4xiwg';

export const cloudinaryGenericErrorLight =
  'https://media.daily.dev/image/upload/v1725365692/lightversion_dmnj1s.gif';

export const cloudinaryGenericErrorDark =
  'https://media.daily.dev/image/upload/v1725365692/darkversion_bfrze7.gif';

export const cloudinaryStreakSplash =
  'https://media.daily.dev/image/upload/v1705386465/Splash_v1lxjk.svg';

export const cloudinaryStreakFire =
  'https://media.daily.dev/image/upload/v1705386465/Hot_nrqvv5.svg';

export const cloudinaryStreakMigrate =
  'https://media.daily.dev/image/upload/s--ntYOqtL9--/f_auto/v1713196616/Goodbye_weekly_goals_Welcome_reading_streaks_yslqlp';

export const cloudinaryStreakLost =
  'https://media.daily.dev/image/upload/v1724664713/streak-broken_x1nno4.svg';

export const cloudinaryDevcardDefaultCoverImage =
  'https://media.daily.dev/image/upload/s--VMbOMIjj--/f_auto/v1710057765/public/DevCard-cover';

export const cloudinaryReputationPrivilegesUnlocked =
  'https://media.daily.dev/image/upload/s--6sO7fJKh--/v1709136797/image_epr7dz.svg';

export const cloudinaryShortcutsIconsGmail =
  'https://media.daily.dev/image/upload/s--QYLzNTIV--/f_auto/v1717506847/public/Gmail%20Shortcut';

export const cloudinaryShortcutsIconsGithubLight =
  'https://media.daily.dev/image/upload/s--M5XOonZ3--/f_auto/v1717513011/public/GitHub%20Shortcut%20-%20Light%20mode';

export const cloudinaryShortcutsIconsGithubDark =
  'https://media.daily.dev/image/upload/s--qyAG2NPK--/f_auto/v1717513011/public/GitHub%20Shortcut%20-%20Dark%20mode';

export const cloudinaryShortcutsIconsReddit =
  'https://media.daily.dev/image/upload/s--9UfrZdCc--/f_auto/v1717506847/public/Reddit%20Shortcut';

export const cloudinaryShortcutsIconsOpenai =
  'https://media.daily.dev/image/upload/s--D__WRZ3a--/f_auto/v1717506847/public/ChatGPT%20Shortcut';

export const cloudinaryShortcutsIconsStackoverflow =
  'https://media.daily.dev/image/upload/s--B_87VDub--/f_auto/v1717506847/public/Stackoverflow%20Shortcut';

export const cloudinarySourceRoadmap =
  'https://media.daily.dev/image/upload/s--91LSaHRW--/f_auto,q_auto/v1717766368/roadmap_iambav';

export const cloudinaryWelcomePageHeaderMainImage =
  'https://media.daily.dev/image/upload/s--jn7-qwCj--/f_auto,q_auto/v1721136180/public/daily-to-dev-suffer-together';

export const cloudinaryIntegrationsSlackHeaderLight =
  'https://media.daily.dev/image/upload/s--5PV2NbVq--/f_auto,q_auto/v1721634746/public/Connection%20image%20-%20Light';

export const cloudinaryIntegrationsSlackHeaderDark =
  'https://media.daily.dev/image/upload/s--zzudPNtR--/f_auto,q_auto/v1721634746/public/Connection%20image%20-%20Dark';

export const cloudinaryTopReaderBadgeBackground =
  'https://media.daily.dev/image/upload/v1730888952/webapp/topReaderBadgeBackground.svg';
export const cloudinaryPlusBackground =
  'https://media.daily.dev/image/upload/s--yGWFYjgW--/f_auto/v1731589143/Upgrade_to_plus_4_1_rketmz';

export const cloudinaryAuthBannerBackground =
  'https://media.daily.dev/image/upload/s--lf8LUJjq--/f_auto/v1732012913/login-popover-dailydev_mxb7lw';
export const cloudinaryAuthBannerBackground1920w =
  'https://media.daily.dev/image/upload/s--lf8LUJjq--/c_auto,g_center,w_1920/f_auto//v1732012913/login-popover-dailydev_mxb7lw';

export const cloudinaryAuthBannerBackground1440w =
  'https://media.daily.dev/image/upload/s--lf8LUJjq--/c_auto,g_center,w_1440/f_auto//v1732012913/login-popover-dailydev_mxb7lw';

export const cloudinaryPWA =
  'https://media.daily.dev/image/upload/s--_kFKAft3--/f_auto/v1735045791/web_-_safari_j52hcx';

export const cloudinaryMobilePWAChrome =
  'https://media.daily.dev/image/upload/s--6ajr-Fje--/f_auto/v1735045791/web_-_chrome_we4vak';

export const cloudinaryPWAVideo =
  'https://media.daily.dev/video/upload/s--gN1-dqeq--/v1735029367/web_-_safari_e3wes4.mp4';

export const cloudinaryPWAVideoChrome =
  'https://media.daily.dev/video/upload/s--RD5n9hm9--/v1735044247/web_-_chrome_xavter.mp4';

export const cloudinaryOnboardingExtension = {
  [BrowserName.Chrome]: {
    default:
      'https://media.daily.dev/image/upload/s--HjgXzokn--/c_scale,h_360,w_820/f_auto/dailydev-extenstion-mindblown_ggmkfg',
    retina:
      'https://media.daily.dev/image/upload/s--HjgXzokn--/f_auto/dailydev-extenstion-mindblown_ggmkfg',
  },
  [BrowserName.Edge]: {
    default:
      'https://media.daily.dev/image/upload/s--kvj5ZB_s--/c_scale,h_360,w_820/f_auto/dailydev-extenstion-mindblown-edge_svb0kv',
    retina:
      'https://media.daily.dev/image/upload/s--kvj5ZB_s--/f_auto/dailydev-extenstion-mindblown-edge_svb0kv',
  },
};

export const bookmarkFolderSoonImage =
  'https://media.daily.dev/image/upload/s--_jM3zDSE--/f_auto/v1733239852/daily_dev_bookmarks_folders_fsughm';

export const clickbaitShieldModalImage =
  'https://media.daily.dev/image/upload/s--GWqpMG8r--/f_auto/v1732802237/Streak_together_with_a_friend_1_1_pwoill';

export const cloudinaryGiftedPlusModalImage = `https://media.daily.dev/image/upload/s--JNm5gqXz--/f_auto/v1733838699/daily-dev-plus-gift_qosjrm`;

export const smartPromptModalImage =
  'https://media.daily.dev/image/upload/s--JVcr0aup--/f_auto/v1736060940/Streak_together_with_a_friend_glfbco';
export const smallPostImage = (url: string): string => {
  if (!url) {
    return cloudinaryPostImageCoverPlaceholder;
  }

  return url.replace('/f_auto,q_auto/', '/c_fill,f_auto,q_auto,w_192/');
};

export const plusFeaturesImage =
  'https://media.daily.dev/image/upload/s--c4as3Quw--/f_auto/v1738509922/public/daily.dev%20Plus%20-%20Default';

export const plusRedBackgroundImage =
  'https://media.daily.dev/image/upload/s--agAC5L3c--/f_auto/v1738509922/public/Plus%20bg%20Image';

export const purchaseCoinsCheckoutVideo =
  'https://media.daily.dev/video/upload/s--1p9Qw5ey--/v1741849174/videos/daily.dev_-_get_cores.mp4';

export const purchaseCoinsCheckoutVideoPoster =
  'https://media.daily.dev/image/upload/s--A_4rXIh7--/f_auto/v1741779750/public/Giving%20cores';

export const featuredAwardImage =
  'https://media.daily.dev/image/upload/s--10Rf2kyK--/f_auto/v1743595864/public/Default';

export const disabledCoreImage =
  'https://media.daily.dev/image/upload/s--kTMWrmJV--/f_auto/v1743599810/public/Core-disabled';

export const coreImage =
  'https://media.daily.dev/image/upload/s--YAvJnCmq--/f_auto/v1743599810/public/Core-front';

export const buyCoreStarField =
  'https://media.daily.dev/image/upload/s--W4W5Gmjh--/f_auto,q_auto/v1744197985/webapp/Stars';

const coreValueMap = [
  {
    maxValue: 200,
    image:
      'https://media.daily.dev/image/upload/s--9IXwSmB---/f_auto/v1743599811/public/Core1',
  },
  {
    maxValue: 1_000,
    image:
      'https://media.daily.dev/image/upload/s--ybFIBUnx--/f_auto/v1743599810/public/Core2',
  },
  {
    maxValue: 10_000,
    image:
      'https://media.daily.dev/image/upload/s--kai_mE1u--/f_auto/v1743599810/public/Core3',
  },
  {
    maxValue: 20_000,
    image:
      'https://media.daily.dev/image/upload/s--bSCtv96n--/f_auto/v1743599810/public/Core4',
  },
  {
    maxValue: Infinity,
    image:
      'https://media.daily.dev/image/upload/s--54JYAftK--/f_auto/v1743599810/public/Core5',
  },
];

export const getCoreCurrencyImage = (value: number): string => {
  return coreValueMap.find((core) => core.maxValue > value).image;
};

export const creditCardsImage =
  'https://media.daily.dev/image/upload/s--GG1rD-wP--/f_auto/v1743491782/public/credit';

export const opportunityLiveIllustration =
  'https://media.daily.dev/image/upload/s--W8sKt3tn--/f_auto,q_auto/v1759426186/webapp/opportunity-live-illustration';

/**
 * Plus showcase video/images
 */
export const plusShowcaseTeamImage =
  'https://media.daily.dev/image/upload/s--FM6ekBTf--/f_auto/v1741698925/public/team';
export const plusShowcaseTeamVideo =
  'https://media.daily.dev/video/upload/v1741698572/videos/team.mp4';
export const plusShowcaseCustomFeedsImage =
  'https://media.daily.dev/image/upload/s--OU22D-Xf--/f_auto/v1741690961/public/customfeed';
export const plusShowcaseCustomFeedsVideo =
  'https://media.daily.dev/video/upload/v1741698572/videos/customfeeds.webm';
export const plusShowcaseSmartPrompsImage =
  'https://media.daily.dev/image/upload/s--3WScQpUE--/f_auto/v1741698925/public/smartprompts';
export const plusShowcaseSmartPrompsVideo =
  'https://media.daily.dev/video/upload/v1741698572/videos/smartprompts.webm';
export const plusShowcaseShieldImage =
  'https://media.daily.dev/image/upload/s--UlKSWTvF--/f_auto/v1741698925/public/shield';
export const plusShowcaseShieldVideo =
  'https://media.daily.dev/video/upload/v1741698572/videos/shield.webm';
export const plusShowcaseBookmarkImage =
  'https://media.daily.dev/image/upload/s--PZk2a1PY--/f_auto/v1741690961/public/bookmark';
export const plusShowcaseBookmarkVideo =
  'https://media.daily.dev/video/upload/v1741698572/videos/bookmark.webm';
export const plusShowcaseKeywordImage =
  'https://media.daily.dev/image/upload/s--r2BZKWPk--/f_auto/v1741690961/public/Keyword filters';
export const plusShowcaseAdFreeImage =
  'https://media.daily.dev/image/upload/s--jlfaLYq_--/f_auto/v1741690961/public/Ad-free experience';
export const plusShowcaseSquadImage =
  'https://media.daily.dev/image/upload/s--LKIr_f6r--/f_auto/v1741698925/public/Members-only Squad';

export const boostSuccessCover =
  'https://media.daily.dev/image/upload/s--1ayRTI4g--/f_auto/v1758532937/public/Boost%20-%20Live%20Cover%20image%20(1)';

export const plusShowcaseTranslateImage =
  'https://media.daily.dev/image/upload/s--eHjHLYpQ--/f_auto/v1748954125/public/auto-translate';

export const plusShowcasePresidentialBriefImage =
  'https://media.daily.dev/image/upload/s--7I74Yy6r--/f_auto/v1752495221/public/Personalized%20digest';

export const uploadCvBgLaptop =
  'https://media.daily.dev/image/upload/s--5Ttdly-p--/f_auto/v1752576001/public/job_main_web';

export const uploadCvBgTablet =
  'https://media.daily.dev/image/upload/s--1QIY44IL--/f_auto/v1752668628/public/job_main_ipad';

export const uploadCvBgMobile =
  'https://media.daily.dev/image/upload/s--Y_qhm3Tw--/f_auto/v1752576066/public/job_main_mobile';

export const uploadCvModalSuccessMobile =
  'https://media.daily.dev/image/upload/s--boUrIf1e--/f_auto/v1752576157/public/cv_uploaded_mobile';
export const uploadCvModalSuccess =
  'https://media.daily.dev/image/upload/s--nLoTY15O--/f_auto/v1752576263/public/CV%20uploaded%20successfully%20popover';

export const exportLinkedInMobile =
  'https://media.daily.dev/image/upload/s--PqONkeKS--/f_auto/v1752576240/public/linkedin_cv_mobile';
export const exportLinkedIn =
  'https://media.daily.dev/image/upload/s--UpRCf8h5--/f_auto/v1753166816/public/Export%20from%20LinkedIn%20popover%20web';

export const boostNewPostBanner =
  'https://media.daily.dev/image/upload/s--_UEbmtDg--/f_auto/v1753703398/public/booststrip';

export const boostNewPostBannerLight =
  'https://media.daily.dev/image/upload/s--7CGTLpY_--/f_auto/v1754295928/public/boost-wv';

export const jobsWelcomeDarkMode =
  'https://media.daily.dev/image/upload/s--iK8V4i-t--/f_auto/v1754903868/public/darkbg-Super%20Career%20Connector';
export const jobsWelcomeLightMode =
  'https://media.daily.dev/image/upload/s--OwPStCCF--/f_auto/v1754903896/public/lightbg-Super%20Career%20Connector-1';

export const jobsHowItWorksOne =
  'https://media.daily.dev/image/upload/s--oBG_2HMq--/f_auto/v1755256487/public/recruiting%20system-landing%20page-1';
export const jobsHowItWorksTwo =
  'https://media.daily.dev/image/upload/s--1iphOt2P--/f_auto/v1755256487/public/recruiting%20system-landing%20page-2';
export const jobsHowItWorksThree =
  'https://media.daily.dev/image/upload/s--470GU2QS--/f_auto/v1755256487/public/recruiting%20system-landing%20page-3';
export const recruiterSpamCampaign =
  'https://media.daily.dev/image/upload/s--mFR-ciac--/f_auto/v1759242948/public/Recruiter%20-%202';
export const recruiterSpamCampaignSEO =
  'https://media.daily.dev/image/upload/s--PBa-49xs--/f_auto/v1759245831/public/Recruiter%20-%206';

export const locationProfileImage =
  'https://media.daily.dev/image/upload/s--RYwMw9py--/f_auto/v1726486879/company_bdage_xwzrnh';

export const autofillProfileCover =
  'https://media.daily.dev/image/upload/s--0pMFz3kQ--/f_auto/v1757577987/public/Autofill%20your%20profile!';
export const adFaviconPlaceholder =
  'https://media.daily.dev/image/upload/s--SOLIE7Bc--/f_auto/v1761801782/webapp/daily.dev_-_Boost_Icon';
export const jobOfferDarkDesktop =
  'https://media.daily.dev/image/upload/s--s5wQXzyd--/f_auto/v1762845657/public/jobmatch-web-dark';
export const jobOfferLightDesktop =
  'https://media.daily.dev/image/upload/s--owB1BPLg--/f_auto/v1762845657/public/jobmatch-web-light';
export const jobOfferDarkMobile =
  'https://media.daily.dev/image/upload/s--GadTanSG--/f_auto/v1762845821/public/jobmatch-mobile-dark';
export const jobOfferLightMobile =
  'https://media.daily.dev/image/upload/s--woqk56k5--/f_auto/v1762845946/public/jobmatch-mobile-light';
export const opportunityBriefcase =
  'https://media.daily.dev/image/upload/s--6n-4BFXP--/f_auto/v1763884475/public/dailydev.hire';
export const opportunityBriefcaseDone =
  'https://media.daily.dev/image/upload/s--rWk2SCPQ--/f_auto/v1763884475/public/dailydev.hire.allset';
